package com.atguigu.tingshu.order.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.vo.order.OrderInfoVo;
import com.atguigu.tingshu.vo.order.TradeVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

public interface OrderInfoService extends IService<OrderInfo> {


    /**
     * 订单确认
     * /api/order/orderInfo/trade
     * @return
     */
    OrderInfoVo trade(TradeVo tradeVo, Long userId);

    /**
     * 提交订单
     * /api/order/orderInfo/submitOrder
     * @return
     */
    Map<String, String> submitOrder(OrderInfoVo orderInfoVo, Long userId);

    /**
     * 根据订单号获取订单相关信息
     * /api/order/orderInfo/getOrderInfo/{orderNo}
     */
    OrderInfo getOrderInfo(String orderNo);

    /**
     * 获取我的订单
     * /api/order/orderInfo/findUserPage/1/10
     */
    Page<OrderInfo> findUserPage(Page<OrderInfo> page1, Long userId);

    /**
     * 关单
     * @param
     */
    void orderCanncal(String orderNo);
}
